<template>
	<view class="navgator" :style="{'padding-top':statusHeight + 'px'}">
		<image mode="widthFix" src="../static/f1.png" class="back" @click="backTo"></image>
		<view class="center">
			<label class="title"  v-if="title">{{title}}</label>

		</view>
		<image mode="widthFix" src="../static/img37.png" class="wenhao" v-if="path"></image>
	</view>
</template>

<script>
	export default {
		name: "Navgator",
		props: ['path', 'title'],
		data() {
			return {

			}
		},
		methods: {
			backTo() {
				this.Api.back()
			}
		},
		computed: {
			//状态栏高度
			statusHeight() {
				return uni.getSystemInfoSync().statusBarHeight+20 || 10; //如果没有获取到高度，那么指定10px；
			}
		}
	}
</script>

<style scoped>
	.navgator {
		background-color: #F7F7F7;
		width: 100%;
		height: 80rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		box-sizing: border-box;
		padding-bottom:  40rpx;
		
		position: relative;
	}
.center {
		flex: 1;
		display: flex;
		margin-left: -20rpx;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	.back {
		width: 40rpx;
		margin-left: 20rpx;
	}

	.wenhao {
		width: 50rpx;
		
		margin-right: 20rpx;
		

	}
</style>
